package com.pronhub.cloud.shop.redis;


public class MemberServerKeyPrefix implements KeyPrefix {
    private int expireSeconds;
    private String prefix;
    //私有化构造器
    private MemberServerKeyPrefix(String prefix, int expireSeconds){
        this.expireSeconds = expireSeconds;
        this.prefix = prefix;
    }
    @Override
    public String getPrefix() {
        return prefix;
    }

    @Override
    public int getExpireSecond() {
        return expireSeconds;
    }
    //绑定前缀还有时间
    public static final MemberServerKeyPrefix USER_TOKEN=new MemberServerKeyPrefix("userToken:",30*60);
}
